#pragma once

#include "dua_def.h"


struct DuaProto {
    DuaObj obj;
    unsigned stackCount;
    uint32_t* code;
    unsigned codeCount;
    DuaValue* k;
    unsigned kCount;
};

extern DuaProto*
duaNewProto(DuaState* D, unsigned codeCap, unsigned kCount);

extern DuaProto*
duaLoadProto(DuaState* D, const char* str, size_t len);